public class Student {
    private String name = "";
    private int math = 0;
    private int java = 0;
    private int ds = 0;
    private int avg = 0;
    private int total = 0;



    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", math=" + math +
                ", java=" + java +
                ", ds=" + ds +
                ", avg=" + avg +
                ", total=" + total +
                '}';
    }

    //下面一大堆getter setter
    public void setName(String name) {
        this.name = name;
    }

    public void setMath(int math) {
        this.math = math;
    }

    public void setJava(int java) {
        this.java = java;
    }

    public void setDs(int ds) {
        this.ds = ds;
    }

    public void setAvg() {
        this.avg = (math + java + ds) / 3;
    }

    public void setTotal() {
        this.total = math + java + ds;
    }

    public String getName() {
        return name;
    }

    public int getMath() {
        return math;
    }

    public int getJava() {
        return java;
    }

    public int getDs() {
        return ds;
    }

    public int getAvg() {
        return avg;
    }

    public int getTotal() {
        return total;
    }
}
